/**
 * @ClassName LC2778
 * 特殊元素平方和
 * @Author ykx
 * @Date 2024/3/14 15:51
 * @Version 1.0
 */
public class LC2778 {
    public int sumOfSquares(int[] nums) {
        int n = nums.length;
        int result = 0;
        for (int i = 0; i < n; i++) {
            if (n % (i + 1) == 0) {
                result += nums[i] * nums[i];
            }
        }
        return result;
    }
}
